<template>
    <div>
        <c-header :p-title="'编辑'">
            <div class="d-flex justify-content-end align-items-center">
                <!-- <button class="btn btn-sm btn-primary m-r-sm" @click="importFile">导入更新文档</button> -->
                <button type="button" class="btn btn-sm btn-info d-lg-block"  @click="$router.go(-1)"><i class="fa fa-mail-reply m-r-sm"></i>返回</button>
                <btn-refresh class='m-l-15' :p-data='init'></btn-refresh>
            </div>
        </c-header>
        <div class="row">
            <div class="col-lg-12">
                <div class="card">
                    <div class="card-body">
                        <div class="panel-heading  search-heading">
                            <!-- <small class="text-muted">搜索筛选项：</small> -->
                            <div class="m-b-sm">
                                <div class="pull-left m-r m-b-sm">
                                    <label class="l">状态:   </label>
                                    <label class="radio-inline">
                                      <input type="radio" name="inlineRadioOptions" id="inlineRadio1" value="option1"> 申请审核
                                    </label>
                                    <label class="radio-inline">
                                      <input type="radio" name="inlineRadioOptions" id="inlineRadio2" value="option2"> 草稿
                                    </label>
                                    <label class="radio-inline">
                                      <input type="radio" name="inlineRadioOptions" id="inlineRadio3" value="option3"> 正常
                                    </label>
                                </div>
                                <br>
                                <br>
                                <div class="pull-left m-r m-b-sm">
                                    <label class="l">分类:   </label>
                                    <label class="radio-inline">
                                      <input type="radio" name="inlineRadioOption" id="inlineRadio1" value="option1"> 政策资讯
                                    </label>
                                    <label class="radio-inline">
                                      <input type="radio" name="inlineRadioOption" id="inlineRadio2" value="option2"> 相关制度
                                    </label>
                                </div>
                                <br>
                                <br>
                                <div class="pull-left m-r m-b-sm">
                                    <label class="control-label">标题：</label>
                                    <Input class='thumb-search' v-model="search.name" placeholder="请输入姓名"/>
                                </div>
                                <br>
                                <br>
                                <br>
                                <div class="m-r">
                                    <label>内容：</label>
                                    <editor></editor>
                                </div>
                                <br>
                                <br>
                                <label>列表页图片</label>
                               <uploaderimg></uploaderimg>
                                <br>
                                <br>
                                <label>附件上传</label>
                               <uploaderfile></uploaderfile>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
       <!--  <operate-save ref="operate_save" @on-change="initSubmit"></operate-save>
        <operate-org ref="operate_org" @on-change="initSubmit"></operate-org>
        <operate-import ref="operate_import" @on-change="initSubmit"></operate-import> -->
    </div>
</template>
<script>
    import serCustomer from '../../serves/api-customer'
    import richTable from './RichTable'
    import operateSave from './saveInset'
    import operateOrg from './OperateOrg.vue'
    import operateImport from './OperateImport.vue'
    import editor from '../../components/common/editor'
    import uploaderimg from '../../components/common/webloadimg'
    import uploaderfile from '../../components/common/webloadfile'
    const __page_key = 'customer.list';
    let searchDef = {
        name:'',
        phone:'',
        status:'1',
        standing:"",
        organization:'',
        contacts_org:'',
        page_row:'',
        page_current:'',
        page_total:''
    };
    export default{
        components:{
            richTable,
            operateSave,
            operateOrg,
            operateImport,
            editor,
            uploaderimg,
            uploaderfile
        },
        data(){
            return{
                total_customer:0,
                last_update:'',
                list:undefined,
                search:{
                	standing:"sdfasdfd",
                },
                selList:[]
            }
        },
        computed:{
             cDocDate(){
                // return [this.doc.start_time,this.doc.end_time]
            },
        },
        beforeMount(){
            // this.searchReset();
        },
        mounted(){
            // this.init();
            
        },
        methods:{
            // searchReset(update,pageState){
            //     if(pageState){
            //         this.$clientPage.def(this.search);
            //         return false
            //     }
            //     const _p=this.$clientPage.getData(__page_key);
            //     if(_p){
            //         this.$set(this,'search',_p);
            //     }else{
            //         this.$set(this,'search',Object.assign({},searchDef));
            //         this.$clientPage.def(this.search);
            //     }
            //     if(update){
            //         this.init();
            //     }
            // },
            searchSelectSex(value){
                // this.$set(this.search,'sex',value);

            },
            // docSelectStartEndDate(value){
            //     this.$set(this.doc,'start_time',value[0]);
            //     this.$set(this.doc,'end_time',value[1]);
            // },
            // searchPage(page){
            //     this.$clientPage.set(this.search,page);
            // },
            // searchChange(){
            //     this.$clientPage.def(this.search);
            //     this.init();
            // },
            // pageRowChange(num){
            //     if(num!= this.search.page_row){
            //         this.$set(this.search,'page_row',num);
            //         if(this.search.page_current == 1){
            //             this.init();
            //         }
            //     }
            // },
            // pageCurrentChange(current){
            //     if(current!= this.search.page_current){
            //         this.$set(this.search,'page_current',current);
            //         this.init();
            //     }
            // },
            // linkPageChange(name,params,query){
            //     this.$clientPage.setData(__page_key,Object.assign({},this.search));
            //     if(name){
            //         this.$router.push({name:name,params:params,query:query})
            //     }
            // },
            //------------------------------------------------------------------------
            async init(data){
            	console.log('初始化')
                // let res = await serCustomer.list({});

                // this.selList = [];
                // this.total_customer = res.addtion_data&&res.addtion_data.total_come||0;
                // this.last_update = res.addtion_data&&res.addtion_data.last_update||'';
                // if(res.code==1){
                //     this.list = res.data||[];
                //     this.searchPage(res.addtion_data&&res.addtion_data.page_info);
                // }else{
                //     this.list = [];
                //     this.searchReset(undefined,true);
                //     this.$Message.error(res.message);
                // }
                // return true;
            },
            searchSelectStatus(value){
                this.$set(this.search,'status',value);
            },
            searchSelectStanding(value){
                this.$set(this.search,'standing',value);
            },
            selectChange(value){
                this.$set(this,'selList',value);
            },
            editDetail(data,edit){
                console.log(data)
                // this.$refs['operate_save'].handleOpen(Object.assign({_type:edit?'edit':'add',_role:"manager"},data))

            },
        }
    }
</script>
<style type="text/less">
    .l{
        margin-right: 20px;
    }
    div.w-e-menu{
          z-index: 0;
        }
</style>